<%@ page language="java" import="java.util.*,com.dao.*,com.beans.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title></title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    

<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<script type="text/javascript" src="js/jquery.easing.js"></script>
<script type="text/javascript" src="js/jquery.accordion.js"></script>

<script type="text/javascript">
	$(function(){
		$('#navigation').accordion({
			active:1,   /* 第三个被激活 */
			header: '.head',
			/*navigation1: false,  */
			event: 'click',
			fillSpace: true,
			animated: 'bounceslide'   /*slide,bounceslide ,bounceslide,easeslide'*/
		});
	});
</script>

<link rel="stylesheet" type="text/css" href="css/menu.css">

</head>

<body>

	<%
		AdminInfo admin=(AdminInfo)session.getAttribute("session_admin");
	 	int roleId=admin.getRoleid();
		MenuDao dao=new MenuDao();
		List<MenuInfo> menuList=dao.getMenuList(0,roleId);
		pageContext.setAttribute("menuList", menuList);
	%>
	<ul id="navigation">
	  <li> 
	  	<c:forEach var="m" items="${menuList}">
	  		<a class="head">${m.menuName}</a>
	  		<ul>
				<li>
					<c:forEach var="m_son" items="${m.subMenuList }"  >
						<a href="${m_son.url}" target="${m_son.target }"><img src="images/${m_son.icon }" /><label>${m_son.menuName }</label></a>
					</c:forEach>
				</li>
			</ul>
	  	</c:forEach>
	  </li>
	</ul>

</body>
</html>